package com.mebs.model;

import org.jt.jet.content.JetNamedObject;
import com.mebs.model.service.visa.ProcessAction;
import com.mebs.model.service.visa.MedicalAction;

/**
 * Date: Apr 3, 2006
 * Time: 5:45:12 PM
 *
 * @author Peschuk Ruslan
 */
public enum CountryAction implements JetNamedObject {
    PROCESS(1, "Process Actions", ProcessAction.class),
    MEDICAL(2, "Medical Action", MedicalAction.class);

    public final int type;
    public final String name;
    public final Class actionClass;

    CountryAction(int type, String name, Class actionClass)
    {
        this.type = type;
        this.name = name;
        this.actionClass = actionClass;
    }

    public static CountryAction getObjectByType(int type)
    {
        return CountryAction.values()[type - 1];
    }

    public Object getObjectId()
    {
        return type;
    }

    public String getObjectName()
    {
        return name;
    }

    public int getObjectType()
    {
        return type;
    }

    public Class getActionClass()
    {
        return actionClass;
    }

    public String toString()
    {
        return name;
    }
}
